home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Games Collection 1 / software vault.zip / software vault / CDR10 / YICN23.ZIP / INCLUDE / YAKFONT.H < prev    next >
C/C++ Source or Header  |  1992-12-09  |  977b  |  26 lines

  1. #include "stddefs.h"
  2. #include "yakLib.h"
  3. #include "yakwin.h"
  4. #include "xlib.h"
  5. #include "xtext.h"
  6.  
  7. class yakFont
  8. {
  9. public:
  10.   word startChar; //ascii code of first character in font
  11.   byte charHeight; //height of characters
  12.   byte charWidth;  //width of characters
  13.   byte *fontData; //data for characters in font, includes first three items
  14.           //(ie character data starts at fontData[4])
  15.   byte numberOfChars;
  16.   yakFont(int iStartChar, int iCharWidth, int iCharHeight, int numChars)
  17.     {startChar = iStartChar; charWidth = iCharWidth; charHeight = iCharHeight; fontData = new byte[(int)numChars * (int)charHeight + 4];};
  18.   yakFont(void) {startChar = 0; charHeight = charWidth = 0; fontData = NULL; numberOfChars = 0;};
  19.   void load(char * filename, yakLib * myYakLib = NULL);
  20.   yakFont(char * filename, yakLib * myYakLib = NULL) {fontData = NULL; load(filename, myYakLib);};
  21.   void registerMe(void);
  22.   void save(char * filename);
  23.   void use(void);
  24. };
  25.  
  26.